package com.heima.admin.controller.login;

import com.heima.admin.service.IAdUserLoginService;
import com.heima.model.admin.dtos.LoginDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login/in")
@RequiredArgsConstructor
public class AdminLoginController {

    private final IAdUserLoginService adUserService;

    @PostMapping
    public ResponseResult adminLogin(@RequestBody LoginDto loginDto){

        return adUserService.login(loginDto);
    }
}
